package com.example.harkerservice.service.impl;

import com.example.hackercore.util.CryptoUtil;
import com.example.harkerservice.service.SsoService;
import org.springframework.stereotype.Service;

/**
 * Description：
 *
 * @Author: cw
 * CreateTime：2022-10-13
 */
@Service
public class SsoServiceImpl implements SsoService {



    @Override
    public String login(String userId) {
        String key = "12345678";
        String client = "o2oa";
        String redirec = "http://localhost/x_desktop/portal.html?id=54122e02-f457-429e-9ab1-69a7440a4dfc&page=68908327-0881-481f-99f9-48bc8ff07525";
        try {
            String encrypt = CryptoUtil.encrypt(userId, key);
            System.out.println(encrypt);
            String url = "http://127.0.0.1/x_desktop/sso.html?client="+client+"&xtoken="+encrypt+"&redirect="+redirec;

        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }






}
